package com.yhsoft.goods.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yhsoft.goods.controller.Po.GoodSkuPo;
import com.yhsoft.goods.entity.GoodSku;
import com.yhsoft.goods.mapper.GoodSkuMapper;
import com.yhsoft.goods.service.IGoodSkuService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 商品sku关联表 服务实现类
 * </p>
 *
 * @author yyyyyyyh
 * @since 2023-09-22
 */
@Service
public class GoodSkuServiceImpl extends ServiceImpl<GoodSkuMapper, GoodSku> implements IGoodSkuService {

    @Override
    public List<GoodSkuPo> getGoodSkuByGoodsId(Integer goodsId) {
        QueryWrapper<GoodSkuPo> wrapper = new QueryWrapper<>();
        wrapper.eq("goods_id",goodsId);
        List<GoodSkuPo> goodSkuPos = this.baseMapper.getGoodSkuListByGoodsId(wrapper);
        return goodSkuPos;
    }
}
